import { INCREMENT, DECREMENT } from "../constant";
const initSalary = {
    salary:12000
}
export default function salaryReduce(preState = initSalary, action: any) {
  const { type, data } = action;
  switch (type) {
    case INCREMENT:
      return {...preState,salary:preState.salary+1000};
    case DECREMENT:
      return {...preState,salary:preState.salary-1000};
    default:
      return preState;
  }
}
